package com.gaber.polymorphic;

/**
 * @author gaber
 * @date 2023/7/11 15:59:39
 * @description 多态模块
 */
public class VirtualDemo {
    public static void main(String[] args) {
        Salary s = new Salary("员工1", "北京", 3, 3600.00);
        Employee e = new Salary("员工 B", "上海", 2, 2400.00);
        Employee employee = new Employee("员工1", "北京", 3);
        System.out.println("使用 Salary 的引用调用 mailCheck -- ");
        s.mailCheck();
        System.out.println("\n使用 Employee 的引用调用 mailCheck--");
        e.mailCheck();
    }
}
